#include "gui.h"
#include <QtWidgets/QApplication>
#include <QSplashScreen>
#include "Windows.h"
#include <QxtLogger>
#include <QxtBasicFileLoggerEngine>
#include <QxtBasicSTDLoggerEngine>

void setUpLogging() {
	QxtLoggerEngine *info = new QxtBasicFileLoggerEngine("info.log");
	QxtLoggerEngine *dbg = new QxtBasicSTDLoggerEngine();

	qxtLog->addLoggerEngine("info", info);
	qxtLog->addLoggerEngine("dbg", dbg);

	qxtLog->disableAllLogLevels();

	qxtLog->enableLogLevels("info", QxtLogger::InfoLevel | QxtLogger::WarningLevel | QxtLogger::ErrorLevel | QxtLogger::CriticalLevel | QxtLogger::FatalLevel | QxtLogger::WriteLevel);
	qxtLog->enableLogLevels("dbg", QxtLogger::AllLevels);
}
int main(int argc, char *argv[])
{
	setUpLogging();
	QApplication a(argc, argv);
	GUI w;
	QPixmap pixmap(":/GUI/Resources/Splash Screen.jpg");
	QSplashScreen splash(pixmap, Qt::WindowStaysOnTopHint);
	splash.show();
	Sleep(450);
	splash.hide();
	w.show();
	return a.exec();
}

